CD /D %~dp0

set siteUrl=http://localhost

if not "%1"=="" (
   set siteUrl=%1
)

echo Deactivate Features
"%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm" -o deactivatefeature -name SdcSimpleContentFeature -force -url %siteUrl%

echo Install Solutions
REM PAUSE

CD /D %~dp0
call RedeploySolution.cmd %siteUrl%
CD /D %~dp0

echo Replace Placeholders

SET SCRIPTPATH=%~dp0
SET REPLACERPATH=..\..\Resources\
SET REPLACERCONFIGFILEPATH=
SET REPLACER=%REPLACERPATH%DE.Sdc.Tools.Replacer.Console.exe
SET REPLACERCONFIGFILE=ReplacerConfigurationFeature.xml

cd %SCRIPTPATH%
call "%REPLACER%" "%REPLACERCONFIGFILEPATH%%REPLACERCONFIGFILE%" 

echo Activate Features
REM PAUSE

"%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm" -o activatefeature -filename SdcSimpleContentFeature\feature.xml -url %siteUrl%

REM PAUSE



